
import http from "../index";
import {PORT1} from "../config/servicePort";
import {User} from "../interface";
export const uploadFile = (params:FormData) => {
    return http.post<FormData>(PORT1 + `file/upload`, params);
};
export const downloadFile = (url:string) => {
    return http.get<FormData>(PORT1 + `file/${url}`,{},{responseType:'blob'});
};
export const findPage = (params:User.FindPage)=>{
    return http.get(PORT1 + `/file/list`,params)
}
export const deleteFile = (id:number)=>{
    return http.delete(PORT1 + `file/${id}`)
}
